import re
# 爬取https://www.sanchuangedu.cn上的图片
import requests
ret = requests.get("https://www.sanchuangedu.cn/")
s = ret.text
result = re.findall(r'img src="(.*?)"', s)
# print(result)

k = 0
for i in result:
    # print(i)
    url = 'https://www.sanchuangedu.cn'+i
    # print(url)
    with open(f'{k}.jpg', 'ab+') as f:
        f.write(requests.get(url).content)
    k += 1




